Finds sidebar node with <span class="argument">id</span> and returns it or its index.

<div class="definition">
    get([parent], [id], [returnIndex])
</div>

<div class="arguments">
    <table>
    <tr>
        <td>parent</td>
        <td><b>string</b>, id of the parent node (<i>optional</i>)</td>
    </tr>
    <tr>
        <td>id</td>
        <td><b>string</b>, id of the sidebar node (<i>optional</i>)</td>
    </tr>
    <tr>
        <td>returnIndex</td>
        <td><b>boolean</b>, if true returns index in the nodes array (<i>optional</i>)</td>
    </tr>
    </table>
</div>

Returns object or integer or null.

<h4>Description</h4>

The <span class="argument">id</span> argument is the id of the sidebar node used during its creation.
Nodes can be nested. Each node has <a class="argument" href="w2sidebar.nodes">.nodes</a> array that holds its children.
If sidebar node was not found the method will return null.
<div style="height: 10px"></div>

You can optionally specify <span class="argument">parent</span>, which is an id of the parent node. If parent is specified
then it will limit the search scope to that parent and its subnodes.
<div style="height: 10px"></div>

The third optional argument <span class="argument">returnIndex</span> indicates if you want the sidebar node or its index in the
<a class="argument" href="w2sidebar.nodes">.nodes</a> array.
<div style="height: 10px"></div>

You can call this method without any arguments and it will return to you ids of all nodes in the entire sidebar.
<div style="height: 10px"></div>

If you defined the object in the following way:
<textarea class="javascript">
let sidebar = new w2sidebar({
    name : 'sidebar',
    img  : 'icon-page',
    nodes: [
        { id: 'id-1', text: 'Level 1' },
        { id: 'id-2', text: 'Level 2' },
        { id: 'id-3', text: 'Level 3' }
    ]
});
</textarea>

To get ids of all nodes:
<textarea class="javascript">
var all = w2ui.sidebar.get();
console.log(all);
</textarea>

To get a specific node:
<textarea class="javascript">
var node = w2ui.sidebar.get('id-2');
console.log(node);
</textarea>
